The FormFix architecture is structured to balance access to template images, the need to limit memory consumption, the need to carefully examine template images and the need to identify images quickly as explained below.
For most of its operation, FormFix requires a copy of template images. A straight forward approach to providing template images to FormFix would be to simply have a property or method that lets you provide the template for a FormModel object. Unfortunately, that approach is not viable if you have thousands or hundreds (or perhaps even dozens) of forms due to the amount of memory that is required. Instead, FormFix implements the ReadFormImage event mechanism whereby it can request a template image whenever it needs one.
The FormModel object also includes the ReleaseCachedData method that allows you to force the object to discard the template image it might contain.
In order to spend sufficient time analyzing template images prior to form identification and still operate quickly, FormFix allows access to persistent storage using the WriteDataItem event to save the result of template analysis. This analysis is rather time-consuming and subsequent runs of identification will run much faster if FormFix can save the result of the analysis for use at a later date. FormFix's FormModel and IdentificationProcessor both have a pair of events, WriteDataItem and ReadDataItem that FormFix will use to save and retrieve the results of its form analysis. Unless you have a very small number of forms or run your forms-processing application for weeks at a time, you will get a substantial performance boost by properly saving and restoring the data items as FormFix requests.
Normally, you will save the data items in form definition and form set files using FormDirector. Simply save them in the OtherDataItems property of a FormSet or FormDefinition using FormDirector. See the FormDirector help files for more information.